import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

  const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/goodsDetail',
    name: 'GoodsDetail',
    component: () => import( '../views/GoodsDetail.vue')
  },
    {
      path: '/postDetail',
      name: 'PostDetail',
      component: () => import( '../views/PostDetail')
    },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/Login.vue')
  },
    {
      path: '/user',
      name: 'User',
      component:()=>import('../views/User.vue')
    },
    {
      path:'/forum',
      name:'Forum',
      component:()=>import('../views/Forum.vue')
    },
    {
      path:'/sport',
      name:'Sport',
      component:()=>import('../views/Sport.vue')
    },
    {
      path:'/createOrder',
      name:'CreateOrder',
      component:()=>import('../views/CreateOrder')
    },
    {
      path:'/sportDetail',
      name:'SportDetail',
      component:()=>import('../views/SportDetail')
    }

]

const router = new VueRouter({
  routes
})

export default router
